<template>
  <div class="hello">
    <router-link :to="{name:'my-big'}">big页面</router-link>
    <button @click="toBig">big页面</button>
    <h1>我是Hello</h1>
    <h1>{{ msg }}</h1>
  </div>
</template>

<script>
export default {
  props: {
    msg: String
  },
  methods: {
    toBig() {
      this.$router.push({
        // path: '/big'
        name: 'my-big'
      })
    }
  }
}
</script>

<!-- 
  Add "scoped" attribute to limit CSS to this component only
  添加scoped属性，使得css只作用于当前组件。避免样式冲突
 -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
